package com.easy.dfc.service;

import com.easy.dfc.Utils.PagingUtil;
import com.easy.dfc.mapper.ProductPropertiesMapper;
import com.easy.dfc.mapper.ProductSizeMapper;
import com.easy.dfc.mapper.ProductsetMapper;
import com.easy.dfc.mapper.UnitConversionSetMapper;
import com.easy.dfc.entity.ProductProperties;
import com.easy.dfc.entity.ProductSize;
import com.easy.dfc.entity.ProductsetWithBLOBs;
import com.easy.dfc.entity.UnitConversionSet;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by VULCANTSeries on 2017/5/10.
 */
@Service
public class ProductsetService {

    @Resource
    private ProductsetMapper productsetMapper;

    @Resource
    private UnitConversionSetMapper unitConversionSetMapper;

    @Resource
    private ProductPropertiesMapper productPropertiesMapper;

    @Resource
    private ProductSizeMapper productSizeMapper;

    public int insertSelective(ProductsetWithBLOBs productsetWithBLOBs) {
        return productsetMapper.insertSelective(productsetWithBLOBs);
    }

    public ProductsetWithBLOBs selectByProductId(String ProductId) {
        ProductsetWithBLOBs productsetWithBLOBs = productsetMapper.selectByProductId(ProductId);
        return productsetWithBLOBs;
    }

    public ProductsetWithBLOBs selectBySkuId(int skuId) {
        return productsetMapper.selectBySkuId(skuId);
    }

    public int updateByPrimaryKeySelective(ProductsetWithBLOBs productsetWithBLOBs) {
        return productsetMapper.updateByPrimaryKeySelective(productsetWithBLOBs);
    }

    public List<ProductsetWithBLOBs> selectByFactoryId(int factoryId) {
        return productsetMapper.selectByFactoryId(factoryId);
    }

    public List<ProductsetWithBLOBs> selectByBrandId(int BrandId) {
        return productsetMapper.selectByBrandId(BrandId);
    }

    public List<ProductsetWithBLOBs> selectByBrandIdList(PagingUtil pagingUtil) {
        return productsetMapper.selectByBrandIdList(pagingUtil);
    }

    public List<ProductsetWithBLOBs> selectByTagId(int BrandId, int factoryId) {
        return productsetMapper.selectByTagId(BrandId, factoryId);
    }

    public List<ProductsetWithBLOBs> selectByTagIdList(PagingUtil pagingUtil) {
        return productsetMapper.selectByTagIdList(pagingUtil);
    }

    public List<ProductsetWithBLOBs> selectByFactoryIdFor20(PagingUtil pagingUtil) {
        return productsetMapper.selectByFactoryIdFor20(pagingUtil);
    }

    public List<ProductsetWithBLOBs> selectByFactoryIdForNew(PagingUtil pagingUtil) {
        return productsetMapper.selectByFactoryIdForNew(pagingUtil);
    }

    public List<ProductsetWithBLOBs> selectProductList(PagingUtil pagingUtil) {
        return productsetMapper.selectProductList(pagingUtil);
    }

    public List<ProductsetWithBLOBs> selectNewProductList(PagingUtil pagingUtil) {
        return productsetMapper.selectNewProductList(pagingUtil);
    }

    public List<ProductsetWithBLOBs> selectHotProductList(PagingUtil pagingUtil) {
        return productsetMapper.selectHotProductList(pagingUtil);
    }

    public int insertSelective(UnitConversionSet unitConversionSet) {
        return unitConversionSetMapper.insertSelective(unitConversionSet);
    }

    public int updateByPrimaryKeySelective(UnitConversionSet unitConversionSet) {
        return unitConversionSetMapper.updateByPrimaryKeySelective(unitConversionSet);
    }

    public int insertSelective(ProductProperties productProperties) {
        return productPropertiesMapper.insertSelective(productProperties);
    }

    public int updateByPrimaryKeySelective(ProductProperties productProperties) {
        return productPropertiesMapper.updateByPrimaryKeySelective(productProperties);
    }

    public int insertSelective(ProductSize productSize) {
        return productSizeMapper.insertSelective(productSize);
    }

    public List<ProductSize> selectProductSizeByProductId(String productid) {
        return productSizeMapper.selectByProductId(productid);
    }
}
